package com.lantosec.hmrp.modules.eval.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.eval.vo.EvalApplyVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 奖惩申报 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EvalApply extends BaseEntity<EvalApplyVO> {

    private static final long serialVersionUID = 1L;
    public EvalApply(EvalApplyVO vo){
        this.evalApplyId = vo.getEvalApplyId();
        this.applyTitle = vo.getApplyTitle();
        this.applyUserId = vo.getApplyUserId();
        this.applyUser = vo.getApplyUser();
        this.applyTime = vo.getApplyTime();
        this.applyType = vo.getApplyType();
    }

    @Override
    public EvalApplyVO convertToVO(){
        return new EvalApplyVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "eval_apply_id", type = IdType.AUTO)
    private Integer evalApplyId;

    /**
     * 申报标题
     */
    private String applyTitle;

    /**
     * 申报人ID
     */
    private String applyUserId;

    /**
     * 申报人
     */
    private String applyUser;

    /**
     * 申报时间
     */
    private Date applyTime;

    /**
     * 申报奖惩类型(1科室 3个人)
     */
    private Integer applyType;


    public enum ColName {
        eval_apply_id, apply_title, apply_user_id, apply_user, apply_time, apply_type, 
    }
}
